package com.clt.ess.gjzw.domain.applyRandom;

import java.io.Serializable;

//获取随机数接口请求业务参数
public class ApplyRandomRequest implements Serializable {
    //命令编码 applyRandom
    //必须
    private String taskCode;
    //版本号 1.0
    //必须
    private String version;
    //BASE64 编码的申请者签名证书
    //必须
    private String applicantCert;
    //各地区各部门政务服务平台电子印章制作系统产生的随机数，长度为 16 个字节
    //必须
    private String randomA;

    /**
     {
         "taskCode":"applyRandom ",
         "version":"1.0",
         "applicantCert":"BASE64编码的申请者签名证书",
         "randomA":"1234567890123456"
     }
     */

    public ApplyRandomRequest() {
    }

    public ApplyRandomRequest(String taskCode, String version, String applicantCert, String randomA) {
        this.taskCode = taskCode;
        this.version = version;
        this.applicantCert = applicantCert;
        this.randomA = randomA;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public void setTaskCode(String taskCode) {
        this.taskCode = taskCode;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getApplicantCert() {
        return applicantCert;
    }

    public void setApplicantCert(String applicantCert) {
        this.applicantCert = applicantCert;
    }

    public String getRandomA() {
        return randomA;
    }

    public void setRandomA(String randomA) {
        this.randomA = randomA;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"taskCode\":\"")
                .append(taskCode).append('\"');
        sb.append(",\"version\":\"")
                .append(version).append('\"');
        sb.append(",\"applicantCert\":\"")
                .append(applicantCert).append('\"');
        sb.append(",\"randomA\":\"")
                .append(randomA).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
